package basic;

public class Overload {
    public static void main(String[] args) {
        Pupil ming = new Pupil();

        Pupil hong = new Pupil();

        ming.setName("Xiao Ming");
        hong.setName("Xiao","Hong");

        System.out.println(ming.getName());
        System.out.println(hong.getName());
    }
}


class Pupil{

    private String name;

    public String getName() {
        return name;
    }

    public void setName(String name){
        this.name = name;
    }

    public void setName(String a, String b){
        this.name = a+ " " +b;
    }

}